@php
/**@var \App\Models\Backend\System\User $user */
$user = Auth::user();
@endphp
<div class="layui-header dark-theme">
    <!-- 菜 单 顶 部 -->
    <ul class="layui-nav layui-layout-left">
        <li class="layui-nav-item">
            <img id="logo_img" class="img "src="{{env('APP_URL').'/images/logo.png'}}">
        </li>
        <li class="layui-nav-item">
            <span class="brand-title">{{env('APP_NAME')}}</span>
        </li>
    </ul>
    <!-- 多 系 统 菜 单 -->
    <div id="control" class="layui-layout-control"></div>
    <!-- 顶 部 右 侧 菜 单 -->
    <ul class="layui-nav layui-layout-right">
        <li class="refresh layui-nav-item layui-this ">
            <a href="javascript:;" class="layui-icon layui-icon-refresh-1" loading="600"></a>
        </li>
        <li class="layui-nav-item">
            <a href="javascript:;"><span class="sy-brand-info">{{auth()->user()->user_name ?? ''}}</span></a>
        </li>
        <li class="layui-nav-item"><span style="font-size: 25px">|</span></li>
        <li class="layui-nav-item"><a href="{{env('APP_URL')}}/uaclogout"><i class="layui-icon layui-icon-logout" style="font-size: 25px"></i></a></li>
        <li class="layui-nav-item">
            <a href="javascript:void(0)">
                @if ($user->avatar)
                    <img id="avatar" src="{{env('APP_URL').$user->avatar}}" class="layui-nav-img" style="height: 50px;width: 50px">

                @else
                    <img id="avatar" src="{{env('APP_URL').'/images/unknown-head.jpeg'}}" class="layui-nav-img" style="height: 50px;width: 50px">
                @endif
            </a>
        </li>
    </ul>
</div>
